#include<stdio.h>
#include<stdlib.h>
#include "dominion.h"


void testcardIsCouncilRoom(){

	struct gameState* state;

	state=newGame();

	int currentPlayer=0;
	int card=council_room;
	int i=1;
	int handPos=1;

	state->numPlayers=3;
	state->numBuys=0;
	state->handCount[currentPlayer]=1;
	state->handCount[1]=0;
	state->handCount[2]=0;

	//printf("Handcount:%d\n",state->handCount[currentPlayer]);
	int x=cardIsCouncilRoom(card,i,currentPlayer,handPos,state);

	if(x==1 && state->numBuys==1 &&	state->handCount[currentPlayer]==4 && state->handCount[1]==1 &&	state->handCount[2]==1)

	{
		printf("cardisCouncilRoom(): PASS when card is council_room \n");
	}
	else{

		printf("cardisCouncilRoom(): FAIL when card is council_room.\n");
	}
	//printf("Handcount:%d\n",state->handCount[currentPlayer]);

	state->handCount[currentPlayer]=3;
	card=feast;
	state->numBuys=0;
	state->handCount[currentPlayer]=3;
	state->handCount[1]=0;
	state->handCount[2]=0;

	if(!cardIsCouncilRoom(card,i,currentPlayer,handPos,state) &&
			state->numBuys==0 &&
			state->handCount[currentPlayer]==3 &&
			state->handCount[1]==0 &&
			state->handCount[2]==0)
	{
		printf("cardisCouncilRoom(): PASS when card is feast \n");
	}
	else{

		printf("cardisCouncilRoom(): FAIL when card is feast.\n");
	}
	//printf("Handcount:%d\n",state->handCount[currentPlayer]);


}


int main(int argc, char *argv[])
{

	testcardIsCouncilRoom();
    return 0;
}



